go to previous page   go to home page   go to next page

Answer:

Probably this would be OK.


CopyFile Method

The copyFiles() method finally gets down to copying the file. The loop that does the work is just a few statements long!

class CopyMaker
{
   String sourceName, destName;
   BufferedReader source;
   BufferedWriter dest;
   String line;

   private void copyFiles()
   {
     try
     {      
       line = source. ;
       
       // while not End-of-File
       while (  )
       {
         dest. (line);
         line = source. ;
       }
     }
     catch ( IOException iox )
     {
       System.out.println("Problem reading or writing" );
     }
   }
}

QUESTION 12:

Click in the blanks.